package com.xiaoyilin.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@Service
public class FanoutQueueConsumer {

    @RabbitListener(queues = "my.fanout.queue.a")
    public void aListenerFanoutQueue(String str) {
        System.out.println("Listener Fanout Queue A:" + str);
    }

    @RabbitListener(queues = "my.fanout.queue.b")
    public void bListenerFanoutQueue(String str) {
        System.err.println("Listener Fanout Queue B:" + str);
    }

    @RabbitListener(queues = "my.fanout.queue.c")
    public void cListenerFanoutQueue(String str) {
        System.err.println("Listener Fanout Queue C:" + str);
    }

}
